﻿@using BlazorAdmin.Models
@typeparam TItem

<Table TItem="TItem" Items=Items IsBordered="true" IsStriped="true" IsMultipleSelect="IsMultipleSelect" @ref="Context" IsPagination="IsPagination" 
       PageItemsSource="PageItemsSource" IsFixedHeader="IsFixedHeader" IsTree="IsTree" OnTreeExpand="OnTreeExpand!" SortString="@SortString"
       TreeNodeConverter="TreeNodeConverter!" TreeIcon="fa-solid fa-chevron-circle-right" ShowEmpty="ShowEmpty" EmptyText="暂无数据"
       EmptyImage=@(SysConsts.WwwRoot + "/images/empty.svg") ShowDefaultButtons="ShowDefaultButtons" ShowAdvancedSearch="ShowAdvancedSearch"
       OnQueryAsync="OnQueryAsync!" OnDeleteAsync="OnDeleteAsync!" OnSaveAsync="OnSaveAsync!" OnExportAsync="OnExportAsync!" ShowSkeleton="true" ShowLoading="ShowLoading" 
       ShowSearch="ShowSearch" ShowToolbar="ShowToolbar" ShowExtendButtons="ShowExtendButtons" ShowExtendEditButton="ShowExtendEditButton" 
       ShowExtendDeleteButton="ShowExtendDeleteButton" ShowAddButton="@(AuthorizeButton("add") && ShowAddButton)" OnClickRowCallback=OnClickRowCallback
       ShowDeleteButton="@(AuthorizeButton("del") && ShowDeleteButton)" ShowEditButton="@(AuthorizeButton("edit") && ShowEditButton)" ShowSearchText=ShowSearchText
       ShowCardView=ShowCardView ShowColumnList="true" ModelEqualityComparer="ModelEqualityComparer!" ShowDetailRow=ShowDetailRow AllowResizing="AllowResizing" 
       ExtendButtonColumnWidth="ExtendButtonColumnWidth" CustomerSearchModel="CustomerSearchModel" ShowDeleteButtonCallback="ShowDeleteButtonCallback!"
       RowButtonTemplate="RowButtonTemplate!" SelectedRows="SelectedRows" TableToolbarTemplate="TableToolbarTemplate" ShowLineNo="ShowLineNo"
       EditTemplate="EditTemplate!" TableColumns="TableColumns" ShowEditButtonCallback="ShowEditButtonCallback!" EditDialogLabelAlign="Alignment.Right"
       CustomerSearchTemplate="CustomerSearchTemplate!" EditDialogSize="EditDialogSize" SearchDialogSize="SearchDialogSize" EditDialogIsDraggable="true" 
       ShowExportButton="ShowExportButton" IsAutoRefresh="IsAutoRefresh" DetailRowTemplate="DetailRowTemplate!" ShowCheckboxText=ShowCheckboxText>
</Table>